package com.wz.project.stock.viewStock.service.impl;

import java.util.List;

import com.wz.project.stock.viewStock.mapper.ViewStockPkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wz.project.stock.viewStock.mapper.ViewStockMapper;
import com.wz.project.stock.viewStock.domain.ViewStock;
import com.wz.project.stock.viewStock.domain.ViewStockPk;
import com.wz.project.stock.viewStock.service.IViewStockService;
import com.wz.common.utils.text.Convert;

/**
 * 子库存查询Service业务层处理
 * 
 * @author wz
 * @date 2022-12-01
 */
@Service
public class ViewStockServiceImpl implements IViewStockService 
{
    @Autowired
    private ViewStockMapper viewStockMapper;
    @Autowired
    private ViewStockPkMapper viewStockPkMapper;

    /**
     * 查询子库存查询
     * 
     * @param stockId 子库存查询ID
     * @return 子库存查询
     */
    @Override
    public ViewStock selectViewStockById(String stockId)
    {
        return viewStockMapper.selectViewStockById(stockId);
    }

    /**
     * 查询子库存查询列表
     * 
     * @param viewStock 子库存查询
     * @return 子库存查询
     */
    @Override
    public List<ViewStock> selectViewStockList(ViewStock viewStock)
    {
        return viewStockMapper.selectViewStockList(viewStock);
    }
    @Override
    public List<ViewStockPk> selectViewStockListPk(ViewStockPk viewStock)
    {
        return viewStockPkMapper.selectViewStockList(viewStock);
    }
    /**
     * 新增子库存查询
     * 
     * @param viewStock 子库存查询
     * @return 结果
     */
    @Override
    public int insertViewStock(ViewStock viewStock)
    {
        return viewStockMapper.insertViewStock(viewStock);
    }

    /**
     * 修改子库存查询
     * 
     * @param viewStock 子库存查询
     * @return 结果
     */
    @Override
    public int updateViewStock(ViewStock viewStock)
    {
        return viewStockMapper.updateViewStock(viewStock);
    }

    /**
     * 删除子库存查询对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteViewStockByIds(String ids)
    {
        return viewStockMapper.deleteViewStockByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除子库存查询信息
     * 
     * @param stockId 子库存查询ID
     * @return 结果
     */
    @Override
    public int deleteViewStockById(String stockId)
    {
        return viewStockMapper.deleteViewStockById(stockId);
    }
}
